package com.taobao.api.request;

import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.TaobaoObject;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.json.JSONWriter;
import com.taobao.api.response.TmallNrInventoryInventoryQueryResponse;

/**
 * TOP API: tmall.nr.inventory.inventory.query request
 * 
 * @author top auto create
 * @since 1.0, 2018.07.25
 */
public class TmallNrInventoryInventoryQueryRequest extends BaseTaobaoRequest<TmallNrInventoryInventoryQueryResponse> {
	
	

	/** 
	* 入参
	 */
	private String reqDto;

	public void setReqDto(String reqDto) {
		this.reqDto = reqDto;
	}

	public void setReqDto(NrInventoryQueryReqDto reqDto) {
		this.reqDto = new JSONWriter(false,true).write(reqDto);
	}

	public String getReqDto() {
		return this.reqDto;
	}

	public String getApiMethodName() {
		return "tmall.nr.inventory.inventory.query";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("req_dto", this.reqDto);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallNrInventoryInventoryQueryResponse> getResponseClass() {
		return TmallNrInventoryInventoryQueryResponse.class;
	}

	public void check() throws ApiRuleException {
	}
	
	/**
 * 明细
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class NrInventoryQueryDetailReqDto extends TaobaoObject {

	private static final long serialVersionUID = 7324626842753779852L;

	/**
		 * 天猫商品id
		 */
		@ApiField("item_id")
		private Long itemId;
		/**
		 * 天猫门店id
		 */
		@ApiField("store_code")
		private String storeCode;
	

	public Long getItemId() {
			return this.itemId;
		}
		public void setItemId(Long itemId) {
			this.itemId = itemId;
		}
		public String getStoreCode() {
			return this.storeCode;
		}
		public void setStoreCode(String storeCode) {
			this.storeCode = storeCode;
		}

}

	/**
 * 入参
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class NrInventoryQueryReqDto extends TaobaoObject {

	private static final long serialVersionUID = 7536672641565431469L;

	/**
		 * 业务身份标识
		 */
		@ApiField("biz_identity")
		private String bizIdentity;
		/**
		 * 明细
		 */
		@ApiListField("detail_req_dtos")
		@ApiField("nr_inventory_query_detail_req_dto")
		private List<NrInventoryQueryDetailReqDto> detailReqDtos;
	

	public String getBizIdentity() {
			return this.bizIdentity;
		}
		public void setBizIdentity(String bizIdentity) {
			this.bizIdentity = bizIdentity;
		}
		public List<NrInventoryQueryDetailReqDto> getDetailReqDtos() {
			return this.detailReqDtos;
		}
		public void setDetailReqDtos(List<NrInventoryQueryDetailReqDto> detailReqDtos) {
			this.detailReqDtos = detailReqDtos;
		}

}


}